Â
Date: 2018-08-02
R version: 3.5.0
Corresponding author: matthew.malishev@gmail.com
This document can be found at https://github.com/darwinanddavis/UsefulCode
This document uses the schisto mesocosm 2016 data to explore cercariae production from snail hosts of different body sizes (diameter in mm and mass in mg) over a 14 week period under high and low N/P nutrient conditions. Host reproduction (egg masses) is also calculated.
wd <- params$dir # working dir is set in yaml header
setwd(paste0(wd,"/"))
f <- "meso1.csv"
f2 <- "meso2.csv" 'data.frame': 768 obs. of 9 variables:
$ Tank : int 1 2 3 4 5 6 7 8 9 10 ...
$ NP : chr "High" "Low" "Low" "High" ...
$ Size : chr "Small" "Intermediate" "Intermediate" "Small" ...
$ Schisto: chr "No" "Yes" "Yes" "Yes" ...
$ Date : chr "24/05/16" "24/05/16" "24/05/16" "24/05/16" ...
$ Week : int 1 1 1 1 1 1 1 1 1 1 ...
$ Eggs : int 0 0 1 0 0 0 7 10 1 0 ...
$ Phyto_F: num 2585 1005 1327 1399 2341 ...
$ Peri_F : num 7301 4711 7253 8212 4293 ...
Outlier
[1] "Outlier"
Tank Picture_Name Date Snail Diameter Cercariae Week Sampling_Effort Mass
16895 38 P1001057 29/06/16 143 50.54 0 6 3 1239.301
Cleaning Snail and Date cols
Tank Picture_Name Date Snail Diameter Cercariae
84102 367153 358163 86955 239237 46575
Week Sampling_Effort Mass
58976 46116 668838
Set Cex sizes
Set plotting parameters
Get only infected snails
Â
Shell diameter (mm) per tank
Welch Two Sample t-test
data: Diameter and Tank
t = -292.62, df = 54631, p-value < 2.2e-16
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
-19.45781 -19.19889
sample estimates:
mean of x mean of y
5.822942 25.151292
xchar= 1.181 ; (yextra,ychar)= -0.004785 0.004785
points2( 46.27 46.27 , 0.1 0.09522 , pch= 20 20 , ...)
Shell diameter (mm) over time (weeks)
~1000 eggs inoculated at 0,2,4,6 weeks
 ~1000 eggs inoculated at 0,2,4,6 weeks
# Select tank #. Max 48
tank <- 45(Soft tissue dry mass in mg = 0.0096 * Diameter[in mm]^3)
~1000 eggs inoculated at 0,2,4,6 weeks
Outer
Outlier
Without outlier
Outlier
Mass Cercariae
16895 1239.301 0
Point size by cercariae number
Linear log
Shell diameter (mm)
Select tank #. max 48
Cercariae shed over 90 mins per week
~1000 eggs inoculated at 0,2,4,6 weeks
Snail abundance over time (weeks)
Select tank #. max 48
[1] 400
Clean data
phyto = flourescence units
peri = flourescence per 2 weeks / 3.5 inch^2 tile (gross productivity biomass rate)
~1000 eggs inoculated at 0,2,4,6 weeks
xchar= 3.937 ; (yextra,ychar)= -0.001435 0.001435
points2( 147.7 147.7 147.7 , 0.03072 0.02928 0.02785 , pch= 20 20 20 , ...)
~1000 eggs inoculated at 0,2,4,6 weeks